-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rationalize property reversion #46270
Conversation
37f5fd5
to
36daf9b
Compare
I'll still do some additional testing and then I'll post a comment when I feel it's ready. |
36daf9b
to
db9e3f2
Compare
OK. In any case, it may be better to have in 4.0 for some period of time before considering cherry-picking into 3.x, just in case. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I've run into the issued that this should fix so it's going to make the inherited scene workflow (among other things) much more robust.
Thanks! |
This PR changes the algorithm used to determine if a reset (circle arrow) icon must be shown on a property in the editor, which means the current value is different from the default one (the one in the scene it instances or inherits from, the default as declared in the script or the default according to the builtin class).
This PR aims to fix some defects in the current algorithm. For instance, the complaint that in a derived scene the value considered the default for a property is the default in the parent script, instead of the one in the parent, which may already be overriding the default in the script, so that is the new default that matters. (See this complaint: godotengine/godot-proposals#2280 (comment))
UPDATE: After an additional push, it also ensures the value a property gets reverted to is the same that was considered to check for "revertability".
UPDATE: Some additional little issues have been taken care of.
Fixes #50781.
UPDATE: Separate version needed for 3.x: #51166